
import {IRouteProps} from "interface/app";
import * as React from "react";
import { Redirect } from "react-router";
const Demo = React.lazy(() => import('component/Demo/Demo'));
const Hello = React.lazy(() => import('component/Hello/Hello'));
const NotFound = React.lazy(() => import('component/NotFound'));
const Home = React.lazy(() => import('component/Home'));
const NoAuth = React.lazy(() => import('component/NoAuth'));
const PermissionManage = React.lazy(()=>import("component/Main/SideMenu/Menus/items/PermissionManage"));
const PermissionManageUser = React.lazy(()=>import("component/Main/SideMenu/Menus/items/PermissionManage/User"));
const UserManage = React.lazy(()=>import("component/Main/SideMenu/Menus/items/UserManage"));
const UserManageUser = React.lazy(()=>import("component/Main/SideMenu/Menus/items/UserManage/User"));
const routes:IRouteProps[]=[

    { key: 'demo', path: "/demo-manage", component: Demo, exact: true },
    { key: 'hello', path: "/hello", component: Hello, exact: true },
    { key: 'home', path: "/home", component: Home, exact: true },
    { key: 'noauth', path: "/noauth", component: NoAuth, exact: true },
    { key:'permission-manage',path:"/permission-manage",component:PermissionManage,exact:true},
    { key:'permission-manage-user',path:"/permission-manage/user",component:PermissionManageUser,exact:true},
    { key:'user-manage',path:"/user-manage",component:UserManage,exact:true},
    { key:'user-manage-user',path:"/user-manage/user",component:UserManageUser,exact:true},
    { key: 'home', path: "/", exact: true,render:(props)=><Redirect to={'/home'}/> },
    { key: 'other', path: "/", component: NotFound, exact: false }
]

export  {routes}
